<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header">
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content" style="margin-top:30px ">
        <form class="form-horizontal m" id="form-people-edit" th:object="${people}">
			<div class="container-div">
				<div class="col-sm-12 search-collapse" style="margin-top:30px;padding-top: 30px;">
					<div class="row margin-top">
						<div class="col-xs-4">
							<label class="col-sm-3 control-label">姓名：</label>
							<div class="col-sm-8">
								<input id="peopleName" disabled name="peopleName" th:field="*{peopleName}" class="form-control" type="text">
							</div>
						</div>
						<div class="col-xs-4">
							<label class="col-sm-3 control-label">身份证号：</label>
							<div class="col-sm-8">
								<input id="peopleIdCard" disabled  name="peopleIdCard" th:field="*{peopleIdCard}" class="form-control" type="text">
							</div>
						</div>
						<div class="col-xs-4">
							<label class="col-sm-3 control-label">市：</label>
							<div class="col-sm-8">
								<input id="peopleCity" disabled name="peopleCity" th:field="*{peopleCity}" class="form-control" type="text">
							</div>
						</div>

					</div>
					<div  class="row margin-top">
						<div class="col-xs-4">
							<label class="col-sm-3 control-label">县：</label>
							<div class="col-sm-8">
								<input id="peopleCounty"  disabled name="peopleCounty" th:field="*{peopleCounty}" class="form-control" type="text">
							</div>
						</div>
						<div class="col-xs-4">
							<label class="col-sm-3 control-label">乡镇：</label>
							<div class="col-sm-8">
								<input id="peopleTownship"  disabled name="peopleTownship" th:field="*{peopleTownship}" class="form-control" type="text">
							</div>
						</div>
						<div class="col-xs-4">
							<label class="col-sm-3 control-label">社区：</label>
							<div class="col-sm-8">
								<input id="peopleVillage" disabled name="peopleVillage" th:field="*{peopleVillage}" class="form-control" type="text">
							</div>
						</div>

					</div>
					<div  class="row margin-top">
						<div class="col-xs-4">
							<label class="col-sm-3 control-label">详细地址：</label>
							<div class="col-sm-8">
								<input id="peopleDetailAdress" disabled name="peopleDetailAdress" th:field="*{peopleDetailAdress}" class="form-control" type="text">
							</div>
						</div>
						<div class="col-xs-4">
							<label class="col-sm-3 control-label">手机号：</label>
							<div class="col-sm-8">
								<input id="peopleConnectPhone" disabled name="peopleConnectPhone" th:field="*{peopleConnectPhone}" class="form-control" type="text">
							</div>
						</div>
						<div class="col-xs-4">
							<label class="col-sm-3 control-label">岗位（工种）：</label>
							<div class="col-sm-8">
								<input id="peopleJob"  disabled name="peopleJob" th:field="*{peopleJob}" class="form-control" type="text">
							</div>
						</div>
					</div>
					<div  class="row margin-top margin-top margin-top">
						<div class="col-xs-4">
							<label class="col-sm-3 control-label">驾驶人/返岗人员：</label>
							<div class="col-sm-8">
								<input id="peopleBackPeople" disabled name="peopleBackPeople" th:field="*{peopleBackPeople}" class="form-control" type="text">
							</div>
						</div>
						<div class="col-xs-4">
							<label class="col-sm-3 control-label">车辆牌照号：</label>
							<div class="col-sm-8">
								<input id="peopleCarLicense"  disabled name="peopleCarLicense" th:field="*{peopleCarLicense}" class="form-control" type="text">
							</div>
						</div>
					</div>
					 <div row margin-top style="margin-top:30px;margin-bottom:40px;">
						 <div class="panel panel-default">
							 <div class="col-xs-12">
								 <div class="center-block"><h1>健康证明</h1></div>
							 </div>
							 <div class=" col-xs-12" style="margin-bottom: 40px;">
								 <input class="hide" id="peopleLinkAdress" th:value="*{peopleLinkAdress}">
								<img id="peopleLink" class="img-responsive center-block hide"  />
							 </div>
						 </div>
					 </div>
			</div>
			</div>
		</form>
    </div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		$(function () {
          var address= $("#peopleLinkAdress").val();
          $("#peopleLink").attr("src","/file/download/?productResourceId="+address);
			$("#peopleLink").removeClass("hide");

		})
		var prefix = ctx + "system/people"
		$("#form-people-edit").validate({
			rules:{
                peopleConnectPhone:{
                    required:true,
                    isPhone:true,
                    remote: {
                        url: ctx + "system/user/checkPhoneUnique",
                        type: "post",
                        dataType: "json",
                        data: {
                            name: function () {
                                return $.common.trim($("#peopleConnectPhone").val());
                            }
                        },
                        dataFilter: function (data, type) {
                            return $.validate.unique(data);
                        }
                    }
                },
                peopleName:{
                    required:true,
                },
                peopleIdCard:{
                    required:true,
                    maxlength: 18
                },
			}
		});

		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/edit", $('#form-people-edit').serialize());
	        }
	    }
	</script>
</body>
</html>
